package com.project.web.admin.utils.setting;

import com.project.web.admin.service.common.SysConfigService;
import org.springframework.util.Assert;
import org.yun.common.utils.SpringUtils;
import org.yun.common.utils.setting.Setting;

public final class SettingUtils {

    /**
     * 不可实例化
     */
    private SettingUtils() {
    }

    /**
     * 获取系统设置
     *
     * @return 系统设置
     */
    public static Setting get() {
        Object sysConfigServiceObj = SpringUtils.getBean("sysConfigServiceImpl");
        Assert.notNull(sysConfigServiceObj, "sysConfigService为空");
        SysConfigService sysConfigService = (SysConfigService) sysConfigServiceObj;
        return sysConfigService.get();
    }
}
